﻿using System;
using System.AutoUpdate.Interfaces;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace System.AutoUpdate.Managers
{
    /// <summary>
    /// Thread-safe update source manager
    /// </summary>
    public sealed class SourceManager
    {
        #region Singleton

        /// <summary>
        /// Singleton private instance
        /// </summary>
        private static SourceManager _instance;

        /// <summary>
        /// Singleton public access
        /// </summary>
        public static SourceManager Instance
        {
            get
            {
                return _instance ?? (_instance = new SourceManager());
            }
        }

        #endregion

        #region Properties

        public List<IUpdateSource> Sources
        {
            get;
            private set;
        }

        #endregion

        private SourceManager ()
        {
            Sources = new List<IUpdateSource> ();
        }
    }
}
